﻿<Window x:Class="ColorMathManager.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="492" Width="945">
    <Grid>
        <TreeView HorizontalAlignment="Left" Margin="12,12,0,12" Name="treeTestSet" Width="210" >
            <TreeView.ItemTemplate>
                <HierarchicalDataTemplate>
                    <WrapPanel>
                        <Rectangle Height="20" Width="20" RadiusY="3" RadiusX="3" Stroke="Black">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{Binding Color}"></SolidColorBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <TextBlock Text="{Binding Text}"></TextBlock>
                    </WrapPanel>
                </HierarchicalDataTemplate>
            </TreeView.ItemTemplate>
        </TreeView>
        <Button Content="Test 1" Height="23" HorizontalAlignment="Left" Margin="228,13,0,0" Name="buttonTest1" VerticalAlignment="Top" Width="75" Click="buttonTest1_Click" />
        <Button Content="Arrange" Height="23" HorizontalAlignment="Left" Margin="228,216,0,0" Name="buttonArrange" VerticalAlignment="Top" Width="75" Click="buttonArrange_Click" />
        <TreeView Margin="309,12,371,11" Name="treeResult" >
            <TreeView.ItemTemplate>
                <HierarchicalDataTemplate  ItemsSource="{Binding Nodes}">
                    <WrapPanel>
                        <Rectangle Height="20" Width="20" RadiusY="3" RadiusX="3" Stroke="Black">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{Binding Color}"></SolidColorBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <TextBlock Text="{Binding Text}"></TextBlock>
                    </WrapPanel>
                </HierarchicalDataTemplate>
            </TreeView.ItemTemplate>
        </TreeView>
       <TextBox Height="23" HorizontalAlignment="Left" Margin="234,49,0,0" Name="textBoxNum" VerticalAlignment="Top" Width="52" Text="1" />
    </Grid>
</Window>
